<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Monitor</title>
    <link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
    <link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet">
</head>
<body>
<div style="position: absolute;right: 0;">
    <% if(typeof total !== 'undefined'){ %>
    <%=total||0%> <%=todayCount||0%>
    <% } %>
</div>
<table class="table">
    <thead>
    <tr>
        <th>KEY</th>
        <th>IP</th>
        <th>设备</th>
        <th>来源</th>
        <th>时间</th>
    </tr>
    </thead>
    <% rows.forEach(function (row) { %>
    <tr>
        <% var ua = parser(row.ua);%>
        <td><%=row.key%></td>
        <td><%=row.ip%></td>
        <td>
            <span class="text-success"><%=ua.browser.name%>(<%=ua.browser.version%>)</span>
            <span class="text-danger"><%=ua.os.name%>(<%=ua.os.version%>)</span>
        </td>
        <td><%=row.referer%></td>
        <td><%=new Date(row.time).toLocaleString()%></td>
    </tr>
    <% }) %>
</table>

<!--<script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>-->
</body>
</html>